<template>
<div>
  <h1>教务管理系统-学生<span class="logout"><el-link @click="logout">退出登录</el-link></span></h1>
  <el-row class="tac">
    <el-col :span="4">
      <el-menu
          router
          default-active="userInfo"
      >
        <el-menu-item index="/student/userInfo">
          <span slot="title">个人信息</span>
        </el-menu-item>
        <el-menu-item index="/student/classInfo">
          <span slot="title">课表查询</span>
        </el-menu-item>
        <el-menu-item index="/student/scoreInfo">
          <span slot="title">成绩查询</span>
        </el-menu-item>
      </el-menu>
    </el-col>
    <el-col :span="20">
      <router-view/>
    </el-col>
  </el-row>

</div>
</template>

<script>
export default {
  name: "Student",
  methods:{
    logout(){
      sessionStorage.removeItem("user")
      this.$router.push('/')
    }
  }
}
</script>

<style scoped>
.logout{
  display: inline-block;
  float: right;
  margin-right: 200px;
  font-size: 16px;
}
</style>